/*  1:   */ package org.jetbrains.jps.model.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsElementReference;
import org.jetbrains.jps.model.JpsEventDispatcher;
import org.jetbrains.jps.model.JpsModel;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */ 
/*  8:   */ public class JpsModelImpl
/*  9:   */   implements JpsModel
/* 10:   */ {
/* 11:   */   private JpsProjectImpl a;
/* 12:   */   private JpsGlobalImpl b;
/* 13:   */   private JpsModelImpl c;
/* 14:   */   private final JpsEventDispatcher d;
/* 15:   */   
/* 16:   */   public JpsModelImpl(JpsEventDispatcher paramJpsEventDispatcher)
/* 17:   */   {
/* 18:33 */     this.d = paramJpsEventDispatcher;
/* 19:34 */     this.a = new JpsProjectImpl(this, paramJpsEventDispatcher);
/* 20:35 */     this.b = new JpsGlobalImpl(this, paramJpsEventDispatcher);
/* 21:   */   }
/* 22:   */   
/* 23:   */   private JpsModelImpl(JpsModelImpl paramJpsModelImpl, JpsEventDispatcher paramJpsEventDispatcher)
/* 24:   */   {
/* 25:39 */     this.c = paramJpsModelImpl;
/* 26:40 */     this.d = paramJpsEventDispatcher;
/* 27:41 */     this.a = new JpsProjectImpl(paramJpsModelImpl.a, this, paramJpsEventDispatcher);
/* 28:42 */     this.b = new JpsGlobalImpl(paramJpsModelImpl.b, this, paramJpsEventDispatcher);
/* 29:   */   }
/* 30:   */   
/* 31:   */   @NotNull
/* 32:   */   public JpsProjectImpl getProject()
/* 33:   */   {
/* 34:47 */     JpsProjectImpl tmp4_1 = this.a;
/* 35:47 */     if (tmp4_1 == null) {
/* 36:47 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/impl/JpsModelImpl", "getProject" }));
/* 37:   */     }
/* 38:47 */     return tmp4_1;
/* 39:   */   }
/* 40:   */   
/* 41:   */   @NotNull
/* 42:   */   public JpsGlobalImpl getGlobal()
/* 43:   */   {
/* 44:52 */     JpsGlobalImpl tmp4_1 = this.b;
/* 45:52 */     if (tmp4_1 == null) {
/* 46:52 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/impl/JpsModelImpl", "getGlobal" }));
/* 47:   */     }
/* 48:52 */     return tmp4_1;
/* 49:   */   }
/* 50:   */   
/* 51:   */   @NotNull
/* 52:   */   public JpsModel createModifiableModel(@NotNull JpsEventDispatcher paramJpsEventDispatcher)
/* 53:   */   {
/* 54:58 */     if (paramJpsEventDispatcher == null) {
/* 55:58 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/impl/JpsModelImpl", "createModifiableModel" }));
/* 56:   */     }
/* 57:58 */     void tmp49_46 = new JpsModelImpl(this, paramJpsEventDispatcher);
/* 58:58 */     if (tmp49_46 == null) {
/* 59:58 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/impl/JpsModelImpl", "createModifiableModel" }));
/* 60:   */     }
/* 61:58 */     return tmp49_46;
/* 62:   */   }
/* 63:   */   
/* 64:   */   public void registerExternalReference(@NotNull JpsElementReference<?> paramJpsElementReference)
/* 65:   */   {
/* 66:63 */     if (paramJpsElementReference == null) {
/* 67:63 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/impl/JpsModelImpl", "registerExternalReference" }));
/* 68:   */     }
/* 69:63 */     this.a.addExternalReference(paramJpsElementReference);
/* 70:   */   }
/* 71:   */   
/* 72:   */   public void commit()
/* 73:   */   {
/* 74:68 */     this.c.a(this);
/* 75:   */   }
/* 76:   */   
/* 77:   */   private void a(@NotNull JpsModelImpl paramJpsModelImpl)
/* 78:   */   {
/* 79:72 */     if (paramJpsModelImpl == null) {
/* 80:72 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/impl/JpsModelImpl", "applyChanges" }));
/* 81:   */     }
/* 82:72 */     this.a.applyChanges(paramJpsModelImpl.a);
/* 83:73 */     this.b.applyChanges(paramJpsModelImpl.b);
/* 84:   */   }
/* 85:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.impl.JpsModelImpl

 * JD-Core Version:    0.7.0.1

 */